
<div class="layui-card second_step" style="display: none">
{{--    @foreach($goods_sku_detail as $val)--}}
{{--        <input type="hidden" name="sku_val_{{$val["goods_sku_val"]}}" id="sku_val_{{$val["goods_sku_val"]}}" image="{{$val["image"]}}" price="{{$val["price"]}}">--}}
{{--    @endforeach--}}
    <div class="layui-progress" lay-showPercent="true" style="margin: 20px 200px;">
        <div class="layui-progress-bar layui-bg-green" lay-percent="2/3"></div>
    </div>
    <div class="layui-card-body">
        <div class="layui-form-item">
            <label class="layui-form-label">规格类型</label>
            <div class="layui-input-block">
                <input type="radio" name="sku_type" value="1" @if(isset($goods["sku_type"]) && ($goods["sku_type"] == 1)) checked @endif title="单规格" lay-filter="sku_type">
                <input type="radio" name="sku_type" value="2"  @if(isset($goods["sku_type"]) && ($goods["sku_type"] == 2)) checked @endif title="多规格"  lay-filter="sku_type">
            </div>
        </div>

        <div class="simple_sku" @if($goods["sku_type"] == 2)style="display: none" @endif >
            <div class="layui-form-item">
                <label for="" class="layui-form-label">价格</label>
                <div class="layui-input-block">
                    <input type="text" name="sku_price[]"   placeholder="价格" class="layui-input" >
                </div>
            </div>
            <div class="layui-form-item">
                <label for="" class="layui-form-label">库存</label>
                <div class="layui-input-block">
                    <input type="text" name="sku_stock[]"   placeholder="库存" class="layui-input" >
                </div>
            </div>
        </div>
        <div class="more_sku" @if($goods["sku_type"] == 1)style="display: none" @endif>
            <div class="layuimini-container">
                <div class="layui-form-item">
                    <label class="layui-form-label" >规格名</label>
                    <div class="layui-input-block" id="specItem">
                        @foreach($category_sku as $vo)
                            <input type="checkbox" lay-filter="specs"  @if($vo["is_used"] == 1)checked @endif class="specs{{$vo["id"]}}" name="specs[]" data-title="{{$vo["sku_name"]}}" title="{{$vo["sku_name"]}}" value="{{$vo["id"]}}" content="{{$vo["content"]}}" data-id="{{$vo["id"]}}">
                        @endforeach
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">规格：</label>
                    <div class="layui-input-block">
                        <table class="layui-table" id="spec-table">
                            <thead>
                            <tr>
                                <th>规格名</th>
                                <th>规格值</th>
                            </tr>
                            </thead>
                            <tbody>
                            @foreach($category_sku as $vo)
                                <tr class="specs{{$vo["id"]}}">
                                    <td>{{$vo["sku_name"]}}</td>
                                    <td>
                                        @foreach($vo["sku_val"] as $vo2)
                                            <input type="checkbox" @if($vo2['is_used'] == 1) checked @endif  title="{{$vo2['name']}}" lay-filter="filter" name="specs_value[{{$vo2['name']}}][]" value="{{$vo2['name']}}">
                                        @endforeach
                                    </td>
                                </tr>
                            @endforeach
                            </tbody>
                        </table>
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label">批量设置：</label>
                    <div class="layui-input-block">
                        <table class="layui-table" id="sku-price"  lay-filter="sku-price">
                            <thead>
                            </thead>
                            <tbody></tbody>
                        </table>
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label">SKU表：</label>
                    <div class="layui-input-block">
                        <table class="layui-table" id="sku-table">
                            <thead></thead>
                            <tbody></tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button type="button" class="layui-btn layui-btn-primary layui-btn-sm to_first_step">上一步</button>
                <button type="button" class="layui-btn layui-btn-normal layui-btn-sm to_third_step">下一步</button>
                <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm ">完成</button>
            </div>
        </div>

    </div>
</div>





